package com.suao.fruits.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.suao.common.annotation.Excel;
import com.suao.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 果店损耗管理对象 suao_fruits_spoilage_info
 *
 * @author tyz
 * @date 2023-03-08
 */
@Data
public class FruitsSpoilageInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 水果标识 */
    @Excel(name = "水果标识")
    private Long fruitsId;
    
    @Excel(name = "水果名称")
    private String fruitsName;
    
    /** 单位 */
    @Excel(name = "单位")
    private String unit;

    /** 销售日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "销售日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date spoilageTime;

    /** 进货价 */
    @Excel(name = "进货价")
    private BigDecimal purchasePrice;

    /** 零售价 */
    @Excel(name = "零售价")
    private BigDecimal retailPrice;

    /** 损耗数量 */
    @Excel(name = "损耗数量")
    private BigDecimal spoilageNum;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("fruitsId", getFruitsId())
            .append("spoilageTime", getSpoilageTime())
            .append("purchasePrice", getPurchasePrice())
            .append("retailPrice", getRetailPrice())
            .append("spoilageNum", getSpoilageNum())
            .append("delFlag", getDelFlag())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
